{% extends "base.html" %}
{% block title %} 添加新商品{% endblock %}
{% block header %}

{% endblock %}

{% block content %}

<div class="container">
  <div class="span12">
    <ul class="nav nav-tabs">
      <li><a href="\my\">我的资料</a></li>
      <li ><a href="\my_sell\">我出售的商品</a></li>
      <li ><a href="\my_buy\">我购买的商品</a></li>
      <li class="active"><a href="\my_add\">添加新商品</a></li>
    </ul>
  </div>
</div>

<div class="container">
  <div class="span12">
    <form class="form-horizontal well" action="\my_add\" method="post" enctype="multipart/form-data">
      <fieldset>
        <legend>添加新商品</legend>
        <h3>{{message}}</h3>
        <input type="hidden" name="csrf" value="{{session.token}}">
        <div class="control-group">
          <label class="control-label" for="name">名称</label>
          <div class="controls">
            <input type="text" class="input-medium" id="name" name="name">
          </div>
        </div>

        <div class="control-group">
          <label class="control-label" for="price">价格</label>
          <div class="controls">
            <div class="input-prepend input-append">
              <span class="add-on">¥</span><input type="text" class="input-small" id="price" placeholder="0.00" name="price"><span
                class="add-on">元</span>
            </div>
          </div>
        </div>

        <div class="control-group">
          <label class="control-label" for="tags">标签</label>
          <div class="controls">
            <input type="text" class="input-large" id="tags" name="tags">
            <span class="help-inline">多个标签间用<span class="label label-warning">空格</span>分隔</span>
          </div>
        </div>

        <div class="control-group">
          <label class="control-label" for="photo">上传照片</label>
          <div class="controls">
            <input id="photo" class="input-file" type="file" name="photo" accept="image/gif,image/png" single>
          </div>
        </div>
        

        <div class="control-group">
          <label class="control-label" for="description">详细描述</label>
          <div class="controls">
            <textarea id="description" class="input-xlarge" rows="3" name="description"></textarea>
          </div>
        </div>


        <div class="form-actions">
          <button type="submit" class="btn btn-primary">确定</button>
          <button type="reset" class="btn">取消</button>
        </div>
      </fieldset>
    </form>
  </div>
</div>
{% endblock %}